package com.uniledger.exchange.login;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.text.TextUtils;
import android.widget.Button;
import android.widget.EditText;

import com.uniledger.exchange.HomeActivity;
import com.uniledger.exchange.R;
import com.uniledger.exchange.base.activity.BaseActivity;

import butterknife.BindView;
import butterknife.OnClick;

/**
 * 登录页面
 */
public class SignInActivity extends BaseActivity {


    @BindView(R.id.edit_in_name)
    EditText name;

    @BindView(R.id.edit_in_pwd)
    EditText pwd;

    @BindView(R.id.btn_sign_in)
    Button signIn;

    public static void start(Activity activity){
        Intent intent = new Intent(activity, SignInActivity.class);
        activity.startActivity(intent);
    }

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_sign_in);

    }

    @Override
    public void getParams() {


    }

    @OnClick(R.id.btn_sign_in)
    void signIn() {

        String nameStr = name.getText().toString();
        String pwdStr = pwd.getText().toString();

        if (!TextUtils.isEmpty(nameStr) && !TextUtils.isEmpty(pwdStr)) {
            HomeActivity.start(SignInActivity.this);
            finish();


        } else {

        }

    }


}
